
<?php echo form_open('admin/projects');?>
<center>


<table border="1" class="datagrid" >
<tr>
	<td style="vertical-align: middle;"><a href="<?= site_url() ?>/admin/projects/edit">НОВ</a></td>
	<td style="vertical-align: middle;">Име проекта </td>
	<td >
		<input type="text" name="s_title" value="<?= (isset($s_title)&& !empty($s_title))?$s_title:''?>" size="50" />
	</td>
	<td style="vertical-align: middle;">
		<input type="submit" name="submit" value="Search" />
	</td>
</tr>
</table>
</center>
<br/>

</form>

<table  class="datagrid" width="100%">
<thead>
		<th width="20px">
			N
		</th>
		
		<th width="30%">
			Име
		</th>
		<th width="100%">
			Описание
		</th>
		<th width="20px">
		</th>
		<th>
		</th width="20px">
	</thead>
	<tbody>
<?php $i=0;?>
<?php if (isset($projects) && !empty($projects)) {?>
<?php foreach($projects as $project):$i++;++$offset;    ?>
	
	<tr class="<?= $i%2==0?'even':'odd'?>">
		
		<td style="text-align: center;">
	   		<?=$offset?>
	   </td>
		<td>
	   <?=$project['title']?>
	   </td>
	   <td>
	      <?=strip_tags(trim($project['description']))?>
	   </td>
	   <td>
	   		<a href="<?= site_url('admin/projects/edit/'.$project['id'])?>">
	   		<img border="0" title="Редакция" alt="Редакция" src="<?= base_url() ?>images/Edit-16.png">
	   		</a>
	   </td>
	   	   <td >
	   		<a href="<?= site_url('admin/projects/remove/'.$project['id'].'/'.$currentPage)?>">
	   		<img border="0" title="Изтриване" alt="Изтриване" src="<?= base_url() ?>images/delete.png">
	   		</a>
	   </td>
	</tr>
	
<?php endforeach;?>
<?php }?>
</tbody>
<tfoot>
<tr>
	<td colspan="8"  align="center" >
	  <div class="pagination">
		<?php echo $page_links;?>
		</div>
	</td>
</tr>
</tfoot>
</table>

